package gui.domain;

import java.awt.Font;

import javax.swing.JSlider;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import controller.Controller;

public class Scalecontroller extends JSlider implements ChangeListener {
	
	public Scalecontroller() {
		setOrientation(VERTICAL);
		setValue(0);
		setMajorTickSpacing(10);
		setMinorTickSpacing(1);
		setName("Zoom");
		setMaximum(100);
		setMinimum(-100);
		setPaintTicks(true);
		setPaintLabels(true);
		addChangeListener(this);	
	}

	public void stateChanged(ChangeEvent e) {
	    System.out.println("Changed value " + getValue());
	    Controller.setZoom(getValue());
	}
	

}
